<?php declare(strict_types=1);


namespace App\Model\Entity;

use Swoft\Db\Annotation\Mapping\Column;
use Swoft\Db\Annotation\Mapping\Entity;
use Swoft\Db\Annotation\Mapping\Id;
use Swoft\Db\Eloquent\Model;


/**
 * 用户的attention统计记录
 * Class AttentionLog
 *
 * @since 2.0
 *
 * @Entity(table="attention_log", pool="db2.pool")
 */
class AttentionLog extends Model
{
    /**
     * 
     * @Id()
     * @Column()
     *
     * @var int
     */
    private $id;

    /**
     * attention发起人
     *
     * @Column(name="from_id", prop="fromId")
     *
     * @var int
     */
    private $fromId;

    /**
     * attention对象
     *
     * @Column(name="to_id", prop="toId")
     *
     * @var int
     */
    private $toId;

    /**
     * attention对象的nickname
     *
     * @Column()
     *
     * @var string
     */
    private $nickname;

    /**
     * 被@的次数
     *
     * @Column()
     *
     * @var int
     */
    private $times;

    /**
     * 最新的被@时间
     *
     * @Column(name="recent_time", prop="recentTime")
     *
     * @var int|null
     */
    private $recentTime;


    /**
     * @param int $id
     *
     * @return void
     */
    public function setId(int $id): void
    {
        $this->id = $id;
    }

    /**
     * @param int $fromId
     *
     * @return void
     */
    public function setFromId(int $fromId): void
    {
        $this->fromId = $fromId;
    }

    /**
     * @param int $toId
     *
     * @return void
     */
    public function setToId(int $toId): void
    {
        $this->toId = $toId;
    }

    /**
     * @param string $nickname
     *
     * @return void
     */
    public function setNickname(string $nickname): void
    {
        $this->nickname = $nickname;
    }

    /**
     * @param int $times
     *
     * @return void
     */
    public function setTimes(int $times): void
    {
        $this->times = $times;
    }

    /**
     * @param int|null $recentTime
     *
     * @return void
     */
    public function setRecentTime(?int $recentTime): void
    {
        $this->recentTime = $recentTime;
    }

    /**
     * @return int
     */
    public function getId(): ?int
    {
        return $this->id;
    }

    /**
     * @return int
     */
    public function getFromId(): ?int
    {
        return $this->fromId;
    }

    /**
     * @return int
     */
    public function getToId(): ?int
    {
        return $this->toId;
    }

    /**
     * @return string
     */
    public function getNickname(): ?string
    {
        return $this->nickname;
    }

    /**
     * @return int
     */
    public function getTimes(): ?int
    {
        return $this->times;
    }

    /**
     * @return int|null
     */
    public function getRecentTime(): ?int
    {
        return $this->recentTime;
    }

}
